@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: grid;
place-items: center;
min-height: 100vh;
background: #000;
font-family: 'Poppins', sans-serif;
}
.card {
position: relative;
width: 300px;
height: 400px;
background: #fff;
border-radius: 3px;
margin: 0 auto;
box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.card::before,
.card::after {
content: '';
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border-radius: 3px;
background: #fff;
box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
z-index: -1;
transition: .5s;
}
.card:hover::after {
transform: rotate(10deg);
}
.card:hover::before {
transform: rotate(20deg);
}
.card .imgBox {
position: absolute;
inset: 10px;
background: #101010;
z-index: 1;
transition: .5s;
}
.card:hover .imgBox {
bottom: 75px;
}
.card .imgBox img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover
}
.card .details {
position: absolute;
left: 10px;
right: 10px;
bottom: 10px;
height: 55px;
}
.card .details h2 {
margin-top: 5px;
padding: 0;
font-weight: 900;
font-size: 20px;
color: #101010;
text-align: center;
line-height: 1.15em;
}
.card .details h2 span {
font-weight: 400;
font-size: 15px;
color: #666;
display: block;
}